//Hooks其实就是一个返回所有模板需要的数据的函数
import { ref, onMounted } from "vue";
export default function useMousePoint() {
  const mouseX = ref(0);
  const mouseY = ref(0);
  const mouseMove = (e: MouseEvent) => {
    mouseX.value = e.clientX;
    mouseY.value = e.clientY;
  };
  onMounted(() => {
    console.log("鼠标位置初始化");
  });
  return { mouseX, mouseY, mouseMove };
}
